
public class DonationBox {
	private int totalDonationsPennies;
	private String charityName;
	
	public DonationBox(String inCharityName) {
		charityName = inCharityName;
		totalDonationsPennies = 0;
	}
	
	public String getCharityName() {
		return charityName;
	}
	
	public void donate(int inPennies) {
		if(inPennies < 0) {
			return;
		}
		
		if(inPennies > 1000000000) {
			return;
		}
		
		totalDonationsPennies += inPennies;
	}
	
	public int getTotalDonations() {
		return totalDonationsPennies;
	}
	
	public String toString() {
		String val = "";
			
		val += "charityName: " + charityName;
		val += " totalDonationsPennies: " + totalDonationsPennies;
			
		return val;
	}
}
